plugins.RefillCoordinates = {
   "RefillCoordinates" : function() {
      $("table.vis:last a:contains(|)").each(function() {

         var vil = $(this).html();
         vil = new String(vil.match(/([0-9]+)\|([0-9]+)/gi)).split("|");

         setFunc("refillCoords", function(cx, cy) {
            $("input[name=x]").val(cx);
            $("input[name=y]").val(cy);
         });

         $(this).after(' <img src="/graphic/rechts.png" onclick="refillCoords('+vil[0]+','+vil[1]+');" />');
      });
   },
   'enhance_game_place' : function() {
      plugins.RefillCoordinates.RefillCoordinates();
   },
   'info' : {
      'mandatory' : false,
      'name' : "Quick refiller of coordinates",
      'desc' : "Adds a button to outgoing and incoming attacks or support in the rallypoint to quickly reload the coordinates into the x and y boxes",
      'version' : "Beta v0.1",
      'dev' : "Timas"
   }
}
